<template>
  <el-card class="post-item">

    <template #header>

        <div class="post-item-title">
          <router-link :to="{path:'/post',query:{id:post.id}}">
            <span>{{ post.title }}</span>
          </router-link>
        </div>
      <div v-if="post.excerpt!=''" class="post-item-excerpt">
        <span>{{ post.excerpt }}</span>
      </div>
    </template>
    <div class="header-info">
          <PostInfoBar :post = 'post' />
    </div>
  </el-card>
</template>

<script setup lang="ts">
import PostInfoBar from "@/components/PostInfoBar.vue";
const props = defineProps({
  post:Object,
})

</script>
<style scoped>
.post-item{
    margin-top: 25px;
}
.post-item-title {
    color: #2c3e50;
    font-size: 1.5rem;
    line-height: 1.6;
}
.post-item-excerpt{
  margin-top: 20px;
}
</style>
